import SvgIcon from './svg-icon.vue'

const install = (app) => {
  app.component('svg-icon', SvgIcon) // 注册全局组件
  const req = require.context('../../assets/svgs', false, /\.svg$/)
  const requireAll = requireContext => requireContext.keys().map(requireContext)
  requireAll(req)
}

export default install
